Optimal. Leaf size=36 \[ \frac {x}{2}+\frac {1}{2} \cos ^2\left (\sqrt {x}\right )+\sqrt {x} \cos \left (\sqrt {x}\right ) \sin \left (\sqrt {x}\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.01, antiderivative size = 36, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 3, integrand size = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.375, Rules used = {3443, 3391, 30}
\begin {gather*} \frac {x}{2}+\frac {1}{2} \cos ^2\left (\sqrt {x}\right )+\sqrt {x} \sin \left (\sqrt {x}\right ) \cos \left (\sqrt {x}\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 30
Rule 3391
Rule 3443
Rubi steps
\begin {align*} \int \cos ^2\left (\sqrt {x}\right ) \, dx &=2 \text {Subst}\left (\int x \cos ^2(x) \, dx,x,\sqrt {x}\right )\\ &=\frac {1}{2} \cos ^2\left (\sqrt {x}\right )+\sqrt {x} \cos \left (\sqrt {x}\right ) \sin \left (\sqrt {x}\right )+\text {Subst}\left (\int x \, dx,x,\sqrt {x}\right )\\ &=\frac {x}{2}+\frac {1}{2} \cos ^2\left (\sqrt {x}\right )+\sqrt {x} \cos \left (\sqrt {x}\right ) \sin \left (\sqrt {x}\right )\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.02, size = 31, normalized size = 0.86 \begin {gather*} \frac {1}{4} \left (\cos \left (2 \sqrt {x}\right )+2 \left (x+\sqrt {x} \sin \left (2 \sqrt {x}\right )\right )\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.03, size = 34, normalized size = 0.94
method | result | size |
derivativedivides | \(2 \sqrt {x}\, \left (\frac {\cos \left (\sqrt {x}\right ) \sin \left (\sqrt {x}\right )}{2}+\frac {\sqrt {x}}{2}\right )-\frac {x}{2}-\frac {\left (\sin ^{2}\left (\sqrt {x}\right )\right )}{2}\) | \(34\) |
default | \(2 \sqrt {x}\, \left (\frac {\cos \left (\sqrt {x}\right ) \sin \left (\sqrt {x}\right )}{2}+\frac {\sqrt {x}}{2}\right )-\frac {x}{2}-\frac {\left (\sin ^{2}\left (\sqrt {x}\right )\right )}{2}\) | \(34\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.30, size = 23, normalized size = 0.64 \begin {gather*} \frac {1}{2} \, \sqrt {x} \sin \left (2 \, \sqrt {x}\right ) + \frac {1}{2} \, x + \frac {1}{4} \, \cos \left (2 \, \sqrt {x}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.37, size = 24, normalized size = 0.67 \begin {gather*} \sqrt {x} \cos \left (\sqrt {x}\right ) \sin \left (\sqrt {x}\right ) + \frac {1}{2} \, \cos \left (\sqrt {x}\right )^{2} + \frac {1}{2} \, x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.08, size = 51, normalized size = 1.42 \begin {gather*} \sqrt {x} \sin {\left (\sqrt {x} \right )} \cos {\left (\sqrt {x} \right )} + \frac {x \sin ^{2}{\left (\sqrt {x} \right )}}{2} + \frac {x \cos ^{2}{\left (\sqrt {x} \right )}}{2} + \frac {\cos ^{2}{\left (\sqrt {x} \right )}}{2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.42, size = 23, normalized size = 0.64 \begin {gather*} \frac {1}{2} \, \sqrt {x} \sin \left (2 \, \sqrt {x}\right ) + \frac {1}{2} \, x + \frac {1}{4} \, \cos \left (2 \, \sqrt {x}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.35, size = 23, normalized size = 0.64 \begin {gather*} \frac {x}{2}-\frac {{\sin \left (\sqrt {x}\right )}^2}{2}+\frac {\sqrt {x}\,\sin \left (2\,\sqrt {x}\right )}{2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________